from dolfin import *
mesh = UnitSquare(32, 32)
V = FunctionSpace(mesh, "CG", 1)
v = TestFunction(V)
u = TrialFunction(V)
f = Expression('sin(x[0])*cos(x[1])')
A = assemble(dot(grad(v), grad(u))*dx + v*u*dx)
b = assemble(v*f*dx)
uh = Function(V)
solve(A, uh.vector(), b)
plot(uh)

